home *** CD-ROM | disk | FTP | other *** search
- { Demonstrates the use of function RdKey which is
- assumed to be in a CrtExt.tpu which contains
- your "extenders" for TP's Crt unit.
- }
- program DemoRdKey;
-
- uses
- crt, crtext;
-
- var
- QuickCh : char;
- FullCh : keyrec;
-
- begin
- clrscr;
- repeat
- write('Press a key: ');
- QuickCh := RdKey(FullCh);
- writeln;
- writeln;
- writeln('Quickch (ReadKey''s ch) is ''',
- QuickCh,''' with ascii ',ord(QuickCh));
- writeln;
- if ord(QuickCh) <> 0 then
- begin
- writeln('FullCh.ch is ''', Fullch.ch,'''',
- ' with ascii ',ord(FullCh.ch));
- writeln('FullCh.sc is ', FullCh.sc,' (scan code)');
- end
- else
- begin
- writeln('FullCh.ch is ''', Fullch.ch,'''',
- ' with moved scan ',ord(FullCh.ch));
- writeln('FullCh.sc is ', FullCh.sc,' (sp k flag)');
- end;
- writeln;
- writeln;
- until QuickCh = 'q'
- end.
-
-